<template>
  <div class="login-container">
    <div class="login-card">
      <!-- 忘记密码标题 -->
      <h2 class="login-title">忘记密码</h2>
      
      <!-- 提示信息 -->
      <div class="password-hint">
        请输入您的邮箱地址，我们将发送密码重置链接至您的邮箱
      </div>

      <!-- 表单 -->
      <a-form layout="vertical" class="login-form">
        <!-- Email 输入 -->
        <a-form-item label="邮箱">
          <a-input 
            placeholder="请输入注册时使用的邮箱地址" 
            size="large"
            v-model:value="email"
          />
        </a-form-item>
        
        <!-- 发送按钮 -->
        <a-button 
          type="primary" 
          size="large" 
          class="login-btn"
        >
          发送重置邮件
        </a-button>
        
        <!-- 返回登录链接 -->
        <div class="register-link">
          想起密码?
          <a @click="goToLogin">返回登录</a>
        </div>
      </a-form>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      email: "37053212@qq.com"
    };
  },
  methods: {
    goToLogin() {
      // 这里添加导航到登录页的逻辑
      this.$router.push('/login');
    }
  }
};
</script>

<style scoped>
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #fff;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  padding: 40px;
}

.login-title {
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
}

.password-hint {
  text-align: center;
  color: #666;
  font-size: 14px;
  margin-bottom: 30px;
  line-height: 1.5;
  padding: 0 10px;
}

.login-form {
  margin-bottom: 20px;
}

.login-btn {
  width: 100%;
  height: 44px;
  font-size: 16px;
  margin-top: 10px;
  font-weight: 500;
}

.register-link {
  display: flex; 
  align-items: center; 
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 14px;
  color: #606266;
}

/* 输入框高度和样式调整 */
:deep(.ant-input) {
  height: 40px;
  line-height: 40px;
  padding: 0 15px;
  font-size: 16px;
}

/* 表单项垂直间距调整 */
:deep(.ant-form-item) {
  margin-bottom: 24px;
}

/* 表单标签样式调整 */
:deep(.ant-form-item-label) {
  font-weight: 500;
  color: #606266;
  padding-bottom: 8px;
}

:deep(.ant-form-item-label > label) {
  font-size: 14px;
}

/* 整体表单对齐优化 */
.login-form {
  display: flex;
  flex-direction: column;
}
</style>